<?php

/* html/diary/rijiDP.tpl.html */
class __TwigTemplate_6618da38869e9a4d9d1b5d11490662dfb9a60f2bb2bf92dfd6abe9928ab8c3d6 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "<!DOCTYPE html>
<html lang=\"zh-CN\">

<head>
\t<title>本期活动</title>
\t<meta charset=\"utf-8\">
\t<meta name=\"viewport\" content=\"initial-scale=1.0, maximum-scale=1.0, user-scalable=no\" />
\t<link rel=\"stylesheet\" href=\"/static/diary/css/rijiDP.css\" />
\t<link rel=\"stylesheet\" href=\"/static/common/css/mescroll.min.css\" />
\t<style>
\t\t[v-cloak] {
\t\t\t    display: none !important;
\t\t\t}
\t\t.loading{
\t\t\twidth: 100%;
\t\t\theight:100%;
\t\t\tbackground-color: rgba(0,0,0,0.5);
\t\t\tz-index: 999999;
\t\t\ttext-align: center;
\t\t\tpadding-top: 17rem;
\t\t\tposition: absolute;
\t\t\ttop:0;
\t\t\tleft:0;
\t\t}
\t</style>
</head>

<body>
\t<div class=\"loading\">加载中......</div>
\t<!-- top -->
\t<!--<header id=\"top\">
\t\t<img src=\"/static/diary/assets/arrow.png\">本期活动
\t</header>-->
\t<div id=\"main\">
\t\t<div class='logo' v-cloak>
\t\t\t<img v-bind:src=\"topic_logo\" class=\"banner\" />
\t\t\t<div id=\"huati\">
\t\t\t\t<div class=\"huati_t\">
\t\t\t\t\t<h3>话题：[topic_title]</h3>
\t\t\t\t\t<div>
\t\t\t\t\t\t<img src=\"/static/diary/assets/Group 9.png\" />
\t\t\t\t\t\t<span>[topic_sum_comment]条点评</span>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<p class=\"gaishu\" v-html=\"topic_content\">[topic_content]</p>
\t\t\t\t<p class=\"mingz\">编辑 | <span>[editor]</span></p>
\t\t\t\t<p class=\"time\">TIME | [ctime]</p>
\t\t\t</div>
\t\t</div>
\t\t<!-- 妈妈日记精选 -->
\t\t<div id=\"rijiJX\" class=\"mescroll\" v-cloak>
\t\t\t<p class=\"ceshi\">妈妈日记精选</p>
\t\t\t<div class=\"rijiJX_b\">
\t\t\t\t<div class=\"rijiJX_k\" v-for=\"(item,index) in rijiList\">
\t\t\t\t\t<div class=\"touxiang\">
\t\t\t\t\t\t<div class=\"tou\">
\t\t\t\t\t\t\t<img v-bind:src=\"item.editor_avatar\" style=\"width: 2.1rem;height: 2.1rem;\" />
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<span>[item.editor_name]</span>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"rijiJX_k_tu\" onclick='aHref(this)' v-bind:attr_id='item.id'>
\t\t\t\t\t\t<img v-bind:src=\"item.diary_logo\" />
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"rijiJX_k_zan\">
\t\t\t\t\t\t<div class=\"yan\">
\t\t\t\t\t\t\t<span class=\"di\">[item.read_num]</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div onclick='dianzan(this)' v-bind:attr_id='item.id' :class='{dianzan: item.iszan == 0,liangdianzan: item.iszan == 1}' >
\t\t\t\t\t\t\t<span class=\"di\">[item.zan_num]</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
</body>
<!--<script type=\"text/javascript\" src=\"/static/common/js/zepto.js\"></script>-->
<script type=\"text/javascript\" src=\"/static/common/js/jquery-1.11.2.min.js\"></script>
<script type=\"text/javascript\" src=\"/static/diary/js/rijiZW.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/mescroll.min.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/vue.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/jockey.min.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/public.js\"></script>

<script type=\"text/javascript\">
\tvar gid = ";
        // line 86
        echo twig_escape_filter($this->env, ($context["gid"] ?? null), "html", null, true);
        echo ";
\tvar Api = {
\t\tbase: 'https://clubbear.clubbear.cn',
\t\triji: '/diary/GetLeftComment',
\t\trijiList: '/diary/GetRecomDiary',
\t\tdianzan: '/diary/AgreeZan',
\t\thuati: '/diary/GetActivityDetail'
\t}
\t\$(document).ready(function(){ 
\t\t\$.ajax({
\t\t\turl: Api.base + Api.huati,
\t\t\ttype: 'post',
\t\t\tdata:{
\t\t\t\tperiod:gid
\t\t\t},
\t\t\tdataType: 'json',
\t\t\tsuccess: function (data) {
\t\t\t\t//alert(\"看你长得美\");
\t\t\t\t//console.log(data.data);
\t\t\t\tif( data.code == 1 ){
\t\t\t\t\talert(data.message);
\t\t\t\t\$(\".loading\").hide();
\t\t\t\t\treturn;
\t\t\t\t}
\t\t\t\tvar topic_content = data.data.topic_content;
\t\t\t\t//alert(topic_content);
\t\t\t\tvar topic_sum_comment = data.data.topic_sum_comment;
\t\t\t\tvar topic_title = data.data.topic_title;
\t\t\t\tvar editor = data.data.editor;
\t\t\t\tvar topic_logo = data.data.topic_logo;
\t\t\t\tvar ctime = data.data.ctime;
\t\t\t\tvar app = new Vue({
\t\t\t\t\tel: '.logo',
\t\t\t\t\tdelimiters: ['[', ']'],
\t\t\t\t\tdata: {
\t\t\t\t\t\ttopic_content: topic_content,
\t\t\t\t\t\ttopic_sum_comment: topic_sum_comment,
\t\t\t\t\t\ttopic_title: topic_title,
\t\t\t\t\t\teditor: editor,
\t\t\t\t\t\ttopic_logo: topic_logo,
\t\t\t\t\t\tctime:ctime,
\t\t\t\t\t}
\t\t\t\t})
\t\t\t\t\$(\".loading\").hide();
\t\t\t},
\t\t\terror: function () {
\t\t\t   console.log('获取日记列表数据失败');\t
\t\t\t}
\t\t\t
\t\t});
\t\t//alert('随便1');
\t\t\t\t
\t\t
\t\t
\t\t// 日记精选
\t\tvar vm = new Vue({
\t\t\tel: \"#rijiJX\",
\t\t\tdelimiters: ['[', ']'],
\t\t\tdata: {
\t\t\t\tmescroll: null,
\t\t\t\trijiList: []
\t\t\t},
\t\t\tmounted: function() {
\t\t\t\t//创建MeScroll对象,down可以不用配置,因为内部已默认开启下拉刷新,重置列表数据为第一页
\t\t\t\t//解析: 下拉回调默认调用mescroll.resetUpScroll(); 而resetUpScroll会将page.num=1,再执行up.callback,从而实现刷新列表数据为第一页;
\t\t\t\tvar self = this;
\t\t\t\tself.mescroll = new MeScroll(\"rijiJX\", {
\t\t\t\t\tup: {
\t\t\t\t\t\tcallback: self.upCallback,

\t\t\t\t\t\tpage: {
\t\t\t\t\t\t\tsize: 5
\t\t\t\t\t\t}
\t\t\t\t\t},
\t\t\t\t\t// 锁定上拉恢复
\t\t\t\t\tdown: {
\t\t\t\t\t\tisLock: true
\t\t\t\t\t}
\t\t\t\t});
\t\t\t},
\t\t\tmethods: {
\t\t\t\t//上拉回调 page = {num:1, size:10}; num:当前页 ,默认从1开始; size:每页数据条数,默认10
\t\t\t\tupCallback: function(page) {
\t\t\t\t\tconsole.log(\"page.num==\"+page.num+\", page.size==\"+page.size);
\t\t\t\t\t//联网加载数据
\t\t\t\t\tvar self = this;
\t\t\t\t\tgetListDataFromNet(page.num, page.size, function(data) {
\t\t\t\t\t\t//data=[]; //打开本行注释,可演示列表无任何数据empty的配置
\t\t\t\t\t\t
\t\t\t\t\t\t//如果是第一页需手动制空列表
\t\t\t\t\t\tif(page.num == 1) self.rijiList = [];
\t\t\t\t\t\t
\t\t\t\t\t\t//更新列表数据
\t\t\t\t\t\tself.rijiList = self.rijiList.concat(data);
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
\t\t\t\t\t\t//传参:数据的总数; mescroll会自动判断列表是否有无下一页数据,如果数据不满一页则提示无更多数据;
\t\t\t\t\t\tself.mescroll.endSuccess(data.length);
\t\t\t\t\t\t
\t\t\t\t\t}, function() {
\t\t\t\t\t\t//联网失败的回调,隐藏下拉刷新和上拉加载的状态;
\t\t\t\t\t\tself.mescroll.endErr();
\t\t\t\t\t});
\t\t\t\t},
\t\t\t},
\t\t});
\t\t
\t\t//alert('随便');
\t\tfunction getListDataFromNet(pageNum, pageSize, successCallback, errorCallback) {
\t\t\t\$.ajax({
\t\t\t\turl: Api.base + Api.rijiList,
\t\t\t\tdata: {
\t\t\t\t\tperiod: gid,
\t\t\t\t\tpage: pageNum,
\t\t\t\t\tnum: pageSize
\t\t\t\t},
\t\t\t\ttype: 'post',
\t\t\t\tdataType: 'json',
\t\t\t\tsuccess: function (res) {
\t\t\t\t\tsuccessCallback && successCallback(res.data);
\t\t\t\t},
\t\t\t\terror: function (xhr, state, err) {
\t\t\t\t\tif (errorCallback) {
\t\t\t\t\t\terrorCallback(err);
\t\t\t\t\t} else {
\t\t\t\t\t\tconsole.log('获取日记列表数据失败', err);
\t\t\t\t\t}
\t\t\t\t}
\t\t\t});
\t\t}
\t\t
\t}); 
\t
\tfunction aHref(obj){
\t\twindow.location.href = '/diary/rijiZW.html?gid='+\$(obj).attr('attr_id');
\t}\t
\tfunction dianzan(obj){
\t\tif( loginCall() ){
\t\t\tvar did = \$(obj).attr('attr_id');
\t\t\tif( \$(obj).attr('class') == 'liangdianzan' ){
\t\t\t\t\$(obj).find('span').text( parseInt( \$(obj).find('span').text() ) - 1 );
\t\t\t\t\$(obj).removeClass('liangdianzan').addClass('dianzan');
\t\t\t}else{
\t\t\t\t\$(obj).find('span').text( parseInt( \$(obj).find('span').text() ) + 1 );
\t\t\t\t\$(obj).removeClass('dianzan').addClass('liangdianzan');
\t\t\t}
\t\t\t//  获取点赞接口数据
\t\t\t\$.ajax({
\t\t\t\ttype: \"post\",
\t\t\t\turl: \"/diary/AgreeZan\",
\t\t\t\tdata:{
\t\t\t\t\tdid:did
\t\t\t\t},
\t\t\t\tdataType: \"json\",
\t\t\t\tsuccess: function (data) {
\t\t\t\t\t//console.log(data);
\t\t\t\t},
\t\t\t\terror: function (data) {
\t\t\t\t\t//console.log(data);\t
\t\t\t\t}
\t\t\t});
\t\t}
\t}
</script>
</html>
";
    }

    public function getTemplateName()
    {
        return "html/diary/rijiDP.tpl.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  106 => 86,  19 => 1,);
    }

    public function getSourceContext()
    {
        return new Twig_Source("<!DOCTYPE html>
<html lang=\"zh-CN\">

<head>
\t<title>本期活动</title>
\t<meta charset=\"utf-8\">
\t<meta name=\"viewport\" content=\"initial-scale=1.0, maximum-scale=1.0, user-scalable=no\" />
\t<link rel=\"stylesheet\" href=\"/static/diary/css/rijiDP.css\" />
\t<link rel=\"stylesheet\" href=\"/static/common/css/mescroll.min.css\" />
\t<style>
\t\t[v-cloak] {
\t\t\t    display: none !important;
\t\t\t}
\t\t.loading{
\t\t\twidth: 100%;
\t\t\theight:100%;
\t\t\tbackground-color: rgba(0,0,0,0.5);
\t\t\tz-index: 999999;
\t\t\ttext-align: center;
\t\t\tpadding-top: 17rem;
\t\t\tposition: absolute;
\t\t\ttop:0;
\t\t\tleft:0;
\t\t}
\t</style>
</head>

<body>
\t<div class=\"loading\">加载中......</div>
\t<!-- top -->
\t<!--<header id=\"top\">
\t\t<img src=\"/static/diary/assets/arrow.png\">本期活动
\t</header>-->
\t<div id=\"main\">
\t\t<div class='logo' v-cloak>
\t\t\t<img v-bind:src=\"topic_logo\" class=\"banner\" />
\t\t\t<div id=\"huati\">
\t\t\t\t<div class=\"huati_t\">
\t\t\t\t\t<h3>话题：[topic_title]</h3>
\t\t\t\t\t<div>
\t\t\t\t\t\t<img src=\"/static/diary/assets/Group 9.png\" />
\t\t\t\t\t\t<span>[topic_sum_comment]条点评</span>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<p class=\"gaishu\" v-html=\"topic_content\">[topic_content]</p>
\t\t\t\t<p class=\"mingz\">编辑 | <span>[editor]</span></p>
\t\t\t\t<p class=\"time\">TIME | [ctime]</p>
\t\t\t</div>
\t\t</div>
\t\t<!-- 妈妈日记精选 -->
\t\t<div id=\"rijiJX\" class=\"mescroll\" v-cloak>
\t\t\t<p class=\"ceshi\">妈妈日记精选</p>
\t\t\t<div class=\"rijiJX_b\">
\t\t\t\t<div class=\"rijiJX_k\" v-for=\"(item,index) in rijiList\">
\t\t\t\t\t<div class=\"touxiang\">
\t\t\t\t\t\t<div class=\"tou\">
\t\t\t\t\t\t\t<img v-bind:src=\"item.editor_avatar\" style=\"width: 2.1rem;height: 2.1rem;\" />
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<span>[item.editor_name]</span>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"rijiJX_k_tu\" onclick='aHref(this)' v-bind:attr_id='item.id'>
\t\t\t\t\t\t<img v-bind:src=\"item.diary_logo\" />
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"rijiJX_k_zan\">
\t\t\t\t\t\t<div class=\"yan\">
\t\t\t\t\t\t\t<span class=\"di\">[item.read_num]</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div onclick='dianzan(this)' v-bind:attr_id='item.id' :class='{dianzan: item.iszan == 0,liangdianzan: item.iszan == 1}' >
\t\t\t\t\t\t\t<span class=\"di\">[item.zan_num]</span>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
</body>
<!--<script type=\"text/javascript\" src=\"/static/common/js/zepto.js\"></script>-->
<script type=\"text/javascript\" src=\"/static/common/js/jquery-1.11.2.min.js\"></script>
<script type=\"text/javascript\" src=\"/static/diary/js/rijiZW.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/mescroll.min.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/vue.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/jockey.min.js\"></script>
<script type=\"text/javascript\" src=\"/static/common/js/public.js\"></script>

<script type=\"text/javascript\">
\tvar gid = {{gid}};
\tvar Api = {
\t\tbase: 'https://clubbear.clubbear.cn',
\t\triji: '/diary/GetLeftComment',
\t\trijiList: '/diary/GetRecomDiary',
\t\tdianzan: '/diary/AgreeZan',
\t\thuati: '/diary/GetActivityDetail'
\t}
\t\$(document).ready(function(){ 
\t\t\$.ajax({
\t\t\turl: Api.base + Api.huati,
\t\t\ttype: 'post',
\t\t\tdata:{
\t\t\t\tperiod:gid
\t\t\t},
\t\t\tdataType: 'json',
\t\t\tsuccess: function (data) {
\t\t\t\t//alert(\"看你长得美\");
\t\t\t\t//console.log(data.data);
\t\t\t\tif( data.code == 1 ){
\t\t\t\t\talert(data.message);
\t\t\t\t\$(\".loading\").hide();
\t\t\t\t\treturn;
\t\t\t\t}
\t\t\t\tvar topic_content = data.data.topic_content;
\t\t\t\t//alert(topic_content);
\t\t\t\tvar topic_sum_comment = data.data.topic_sum_comment;
\t\t\t\tvar topic_title = data.data.topic_title;
\t\t\t\tvar editor = data.data.editor;
\t\t\t\tvar topic_logo = data.data.topic_logo;
\t\t\t\tvar ctime = data.data.ctime;
\t\t\t\tvar app = new Vue({
\t\t\t\t\tel: '.logo',
\t\t\t\t\tdelimiters: ['[', ']'],
\t\t\t\t\tdata: {
\t\t\t\t\t\ttopic_content: topic_content,
\t\t\t\t\t\ttopic_sum_comment: topic_sum_comment,
\t\t\t\t\t\ttopic_title: topic_title,
\t\t\t\t\t\teditor: editor,
\t\t\t\t\t\ttopic_logo: topic_logo,
\t\t\t\t\t\tctime:ctime,
\t\t\t\t\t}
\t\t\t\t})
\t\t\t\t\$(\".loading\").hide();
\t\t\t},
\t\t\terror: function () {
\t\t\t   console.log('获取日记列表数据失败');\t
\t\t\t}
\t\t\t
\t\t});
\t\t//alert('随便1');
\t\t\t\t
\t\t
\t\t
\t\t// 日记精选
\t\tvar vm = new Vue({
\t\t\tel: \"#rijiJX\",
\t\t\tdelimiters: ['[', ']'],
\t\t\tdata: {
\t\t\t\tmescroll: null,
\t\t\t\trijiList: []
\t\t\t},
\t\t\tmounted: function() {
\t\t\t\t//创建MeScroll对象,down可以不用配置,因为内部已默认开启下拉刷新,重置列表数据为第一页
\t\t\t\t//解析: 下拉回调默认调用mescroll.resetUpScroll(); 而resetUpScroll会将page.num=1,再执行up.callback,从而实现刷新列表数据为第一页;
\t\t\t\tvar self = this;
\t\t\t\tself.mescroll = new MeScroll(\"rijiJX\", {
\t\t\t\t\tup: {
\t\t\t\t\t\tcallback: self.upCallback,

\t\t\t\t\t\tpage: {
\t\t\t\t\t\t\tsize: 5
\t\t\t\t\t\t}
\t\t\t\t\t},
\t\t\t\t\t// 锁定上拉恢复
\t\t\t\t\tdown: {
\t\t\t\t\t\tisLock: true
\t\t\t\t\t}
\t\t\t\t});
\t\t\t},
\t\t\tmethods: {
\t\t\t\t//上拉回调 page = {num:1, size:10}; num:当前页 ,默认从1开始; size:每页数据条数,默认10
\t\t\t\tupCallback: function(page) {
\t\t\t\t\tconsole.log(\"page.num==\"+page.num+\", page.size==\"+page.size);
\t\t\t\t\t//联网加载数据
\t\t\t\t\tvar self = this;
\t\t\t\t\tgetListDataFromNet(page.num, page.size, function(data) {
\t\t\t\t\t\t//data=[]; //打开本行注释,可演示列表无任何数据empty的配置
\t\t\t\t\t\t
\t\t\t\t\t\t//如果是第一页需手动制空列表
\t\t\t\t\t\tif(page.num == 1) self.rijiList = [];
\t\t\t\t\t\t
\t\t\t\t\t\t//更新列表数据
\t\t\t\t\t\tself.rijiList = self.rijiList.concat(data);
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
\t\t\t\t\t\t//传参:数据的总数; mescroll会自动判断列表是否有无下一页数据,如果数据不满一页则提示无更多数据;
\t\t\t\t\t\tself.mescroll.endSuccess(data.length);
\t\t\t\t\t\t
\t\t\t\t\t}, function() {
\t\t\t\t\t\t//联网失败的回调,隐藏下拉刷新和上拉加载的状态;
\t\t\t\t\t\tself.mescroll.endErr();
\t\t\t\t\t});
\t\t\t\t},
\t\t\t},
\t\t});
\t\t
\t\t//alert('随便');
\t\tfunction getListDataFromNet(pageNum, pageSize, successCallback, errorCallback) {
\t\t\t\$.ajax({
\t\t\t\turl: Api.base + Api.rijiList,
\t\t\t\tdata: {
\t\t\t\t\tperiod: gid,
\t\t\t\t\tpage: pageNum,
\t\t\t\t\tnum: pageSize
\t\t\t\t},
\t\t\t\ttype: 'post',
\t\t\t\tdataType: 'json',
\t\t\t\tsuccess: function (res) {
\t\t\t\t\tsuccessCallback && successCallback(res.data);
\t\t\t\t},
\t\t\t\terror: function (xhr, state, err) {
\t\t\t\t\tif (errorCallback) {
\t\t\t\t\t\terrorCallback(err);
\t\t\t\t\t} else {
\t\t\t\t\t\tconsole.log('获取日记列表数据失败', err);
\t\t\t\t\t}
\t\t\t\t}
\t\t\t});
\t\t}
\t\t
\t}); 
\t
\tfunction aHref(obj){
\t\twindow.location.href = '/diary/rijiZW.html?gid='+\$(obj).attr('attr_id');
\t}\t
\tfunction dianzan(obj){
\t\tif( loginCall() ){
\t\t\tvar did = \$(obj).attr('attr_id');
\t\t\tif( \$(obj).attr('class') == 'liangdianzan' ){
\t\t\t\t\$(obj).find('span').text( parseInt( \$(obj).find('span').text() ) - 1 );
\t\t\t\t\$(obj).removeClass('liangdianzan').addClass('dianzan');
\t\t\t}else{
\t\t\t\t\$(obj).find('span').text( parseInt( \$(obj).find('span').text() ) + 1 );
\t\t\t\t\$(obj).removeClass('dianzan').addClass('liangdianzan');
\t\t\t}
\t\t\t//  获取点赞接口数据
\t\t\t\$.ajax({
\t\t\t\ttype: \"post\",
\t\t\t\turl: \"/diary/AgreeZan\",
\t\t\t\tdata:{
\t\t\t\t\tdid:did
\t\t\t\t},
\t\t\t\tdataType: \"json\",
\t\t\t\tsuccess: function (data) {
\t\t\t\t\t//console.log(data);
\t\t\t\t},
\t\t\t\terror: function (data) {
\t\t\t\t\t//console.log(data);\t
\t\t\t\t}
\t\t\t});
\t\t}
\t}
</script>
</html>
", "html/diary/rijiDP.tpl.html", "/home/wwwroot/Paile/app/views/tpl/html/diary/rijiDP.tpl.html");
    }
}
